import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_demo/redux/bo/user_bo.dart';
import 'package:flutter_demo/ui/page/page_router.dart';
import 'package:get/get.dart';

import '../../redux/store.dart';

class LoginPage extends GetView {
  const LoginPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("登录"),
      ),
      body: OutlinedButton(
        onPressed: () {
          Store store = Get.find();
          store.userScope.user.value = UserBo("大松啊", "x");
          Get.toNamed(CMPageRouter.HOME);
        },
        child: Text("模拟登录"),
      ),
    );
  }
}
